/*
package com.ruoyi.util;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.HashMap;
import java.util.Map;


public class WordReadTest 
{
	public static void main(String[] args) throws InvalidFormatException 
    {
        Map<String, Object> map = new HashMap<String, Object>();
        String driver = "com.mysql.jdbc.Driver";
	    String url = "jdbc:mysql://localhost:8089/?useUnicode=true&characterEncoding=utf-8";
	    String username = "";
	    String password = "";
        try 
        {
        	String sql = "select applicant_type, sp_file_name, ys_file_name from apply_t";//编写要执行的sql语句，此处为从user表中查询所有用户的信息
        	Class.forName(driver);//加载驱动程序，此处运用隐式注册驱动程序的方法
        	Connection con = DriverManager.getConnection(url,username,password);//创建连接对象
        	Statement st = con.createStatement();//创建sql执行对象
        	ResultSet rs = st.executeQuery(sql);//执行sql语句并返回结果集
        	while(rs.next())//对结果集进行遍历输出
        	{
        		
        		WordUtil wu = new WordUtil();
        		if(rs.getString("applicant_type").trim().equals("0"))
        		{
        			wu.generateWordFromTemplate("F:\\a\\about_qs.docx", "F:\\b\\"+rs.getString("sp_file_name"), map);
        			System.out.println("about_qs.docx:"+rs.getString("sp_file_name"));
        			wu.generateWordFromTemplate("F:\\a\\about_financial_qs.docx", "F:\\b\\"+rs.getString("ys_file_name"), map);
        		}
        		else
        		{
        			wu.generateWordFromTemplate("F:\\a\\about_financial_qs.docx", "F:\\b\\"+rs.getString("sp_file_name"), map);
        			System.out.println("about_financial_qs.docx:"+rs.getString("sp_file_name"));
        			wu.generateWordFromTemplate("F:\\a\\about_financial_qs.docx", "F:\\b\\"+rs.getString("ys_file_name"), map);
        		}
	        	System.out.println("Success");
        	}
        }
        catch (Exception e) 
        {
            e.printStackTrace();
        }
    }
}
*/
